package com.ml.mall.bean.req.admin.supplier;

import com.ml.mall.bean.base.PageDto;
import com.ml.mall.utils.RegexpUtils;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * Created by kyyang on 2021/6/26 17:30
 */
@Data
public class SupplierQueryOneByCategoryReq extends PageDto {

    @Pattern(regexp= RegexpUtils.rexp1,message = "Format tarikh tidak betul: yyyy-MM-dd")
    @NotBlank(message = "Tarikh mula tidak boleh kosong")
    private String timeBegin;

    @Pattern(regexp= RegexpUtils.rexp1,message = "Format tarikh tidak betul: yyyy-MM-dd")
    @NotBlank(message = "Tarikh tamat tidak boleh kosong")
    private String timeEnd;

    //0: totalsales hight-low 1:totalsales low-hight
    private int sortType;

    private String categoryName;

    @NotNull(message = "companyId is not null")
    private Long companyId;

}
